\(\int \frac {(e+f x)^3 \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx\) [265]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F(-2)]
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 31, antiderivative size = 231 \[ \int \frac {(e+f x)^3 \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {3 i f^3 x}{8 a d^3}-\frac {i (e+f x)^3}{4 a d}-\frac {6 f^3 \cosh (c+d x)}{a d^4}-\frac {3 f (e+f x)^2 \cosh (c+d x)}{a d^2}+\frac {6 f^2 (e+f x) \sinh (c+d x)}{a d^3}+\frac {(e+f x)^3 \sinh (c+d x)}{a d}+\frac {3 i f^3 \cosh (c+d x) \sinh (c+d x)}{8 a d^4}+\frac {3 i f (e+f x)^2 \cosh (c+d x) \sinh (c+d x)}{4 a d^2}-\frac {3 i f^2 (e+f x) \sinh ^2(c+d x)}{4 a d^3}-\frac {i (e+f x)^3 \sinh ^2(c+d x)}{2 a d} \]

[Out]

-3/8*I*f^3*x/a/d^3-1/4*I*(f*x+e)^3/a/d-6*f^3*cosh(d*x+c)/a/d^4-3*f*(f*x+e)^2*cosh(d*x+c)/a/d^2+6*f^2*(f*x+e)*s
inh(d*x+c)/a/d^3+(f*x+e)^3*sinh(d*x+c)/a/d+3/8*I*f^3*cosh(d*x+c)*sinh(d*x+c)/a/d^4+3/4*I*f*(f*x+e)^2*cosh(d*x+
c)*sinh(d*x+c)/a/d^2-3/4*I*f^2*(f*x+e)*sinh(d*x+c)^2/a/d^3-1/2*I*(f*x+e)^3*sinh(d*x+c)^2/a/d

Rubi [A] (verified)

Time = 0.18 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.258, Rules used = {5682, 3377, 2718, 5554, 3392, 32, 2715, 8} \[ \int \frac {(e+f x)^3 \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {6 f^3 \cosh (c+d x)}{a d^4}+\frac {3 i f^3 \sinh (c+d x) \cosh (c+d x)}{8 a d^4}-\frac {3 i f^2 (e+f x) \sinh ^2(c+d x)}{4 a d^3}+\frac {6 f^2 (e+f x) \sinh (c+d x)}{a d^3}-\frac {3 f (e+f x)^2 \cosh (c+d x)}{a d^2}+\frac {3 i f (e+f x)^2 \sinh (c+d x) \cosh (c+d x)}{4 a d^2}-\frac {i (e+f x)^3 \sinh ^2(c+d x)}{2 a d}+\frac {(e+f x)^3 \sinh (c+d x)}{a d}-\frac {3 i f^3 x}{8 a d^3}-\frac {i (e+f x)^3}{4 a d} \]

[In]

Int[((e + f*x)^3*Cosh[c + d*x]^3)/(a + I*a*Sinh[c + d*x]),x]

[Out]

(((-3*I)/8)*f^3*x)/(a*d^3) - ((I/4)*(e + f*x)^3)/(a*d) - (6*f^3*Cosh[c + d*x])/(a*d^4) - (3*f*(e + f*x)^2*Cosh
[c + d*x])/(a*d^2) + (6*f^2*(e + f*x)*Sinh[c + d*x])/(a*d^3) + ((e + f*x)^3*Sinh[c + d*x])/(a*d) + (((3*I)/8)*
f^3*Cosh[c + d*x]*Sinh[c + d*x])/(a*d^4) + (((3*I)/4)*f*(e + f*x)^2*Cosh[c + d*x]*Sinh[c + d*x])/(a*d^2) - (((
3*I)/4)*f^2*(e + f*x)*Sinh[c + d*x]^2)/(a*d^3) - ((I/2)*(e + f*x)^3*Sinh[c + d*x]^2)/(a*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3392

Int[((c_.) + (d_.)*(x_))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[d*m*(c + d*x)^(m - 1)*((
b*Sin[e + f*x])^n/(f^2*n^2)), x] + (Dist[b^2*((n - 1)/n), Int[(c + d*x)^m*(b*Sin[e + f*x])^(n - 2), x], x] - D
ist[d^2*m*((m - 1)/(f^2*n^2)), Int[(c + d*x)^(m - 2)*(b*Sin[e + f*x])^n, x], x] - Simp[b*(c + d*x)^m*Cos[e + f
*x]*((b*Sin[e + f*x])^(n - 1)/(f*n)), x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1] && GtQ[m, 1]

Rule 5554

Int[Cosh[(a_.) + (b_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.)*Sinh[(a_.) + (b_.)*(x_)]^(n_.), x_Symbol] :> Simp[(c +
 d*x)^m*(Sinh[a + b*x]^(n + 1)/(b*(n + 1))), x] - Dist[d*(m/(b*(n + 1))), Int[(c + d*x)^(m - 1)*Sinh[a + b*x]^
(n + 1), x], x] /; FreeQ[{a, b, c, d, n}, x] && IGtQ[m, 0] && NeQ[n, -1]

Rule 5682

Int[(Cosh[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sinh[(c_.) + (d_.)*(x_)]), x_Symb
ol] :> Dist[1/a, Int[(e + f*x)^m*Cosh[c + d*x]^(n - 2), x], x] + Dist[1/b, Int[(e + f*x)^m*Cosh[c + d*x]^(n -
2)*Sinh[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 1] && EqQ[a^2 + b^2, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {i \int (e+f x)^3 \cosh (c+d x) \sinh (c+d x) \, dx}{a}+\frac {\int (e+f x)^3 \cosh (c+d x) \, dx}{a} \\ & = \frac {(e+f x)^3 \sinh (c+d x)}{a d}-\frac {i (e+f x)^3 \sinh ^2(c+d x)}{2 a d}+\frac {(3 i f) \int (e+f x)^2 \sinh ^2(c+d x) \, dx}{2 a d}-\frac {(3 f) \int (e+f x)^2 \sinh (c+d x) \, dx}{a d} \\ & = -\frac {3 f (e+f x)^2 \cosh (c+d x)}{a d^2}+\frac {(e+f x)^3 \sinh (c+d x)}{a d}+\frac {3 i f (e+f x)^2 \cosh (c+d x) \sinh (c+d x)}{4 a d^2}-\frac {3 i f^2 (e+f x) \sinh ^2(c+d x)}{4 a d^3}-\frac {i (e+f x)^3 \sinh ^2(c+d x)}{2 a d}-\frac {(3 i f) \int (e+f x)^2 \, dx}{4 a d}+\frac {\left (6 f^2\right ) \int (e+f x) \cosh (c+d x) \, dx}{a d^2}+\frac {\left (3 i f^3\right ) \int \sinh ^2(c+d x) \, dx}{4 a d^3} \\ & = -\frac {i (e+f x)^3}{4 a d}-\frac {3 f (e+f x)^2 \cosh (c+d x)}{a d^2}+\frac {6 f^2 (e+f x) \sinh (c+d x)}{a d^3}+\frac {(e+f x)^3 \sinh (c+d x)}{a d}+\frac {3 i f^3 \cosh (c+d x) \sinh (c+d x)}{8 a d^4}+\frac {3 i f (e+f x)^2 \cosh (c+d x) \sinh (c+d x)}{4 a d^2}-\frac {3 i f^2 (e+f x) \sinh ^2(c+d x)}{4 a d^3}-\frac {i (e+f x)^3 \sinh ^2(c+d x)}{2 a d}-\frac {\left (3 i f^3\right ) \int 1 \, dx}{8 a d^3}-\frac {\left (6 f^3\right ) \int \sinh (c+d x) \, dx}{a d^3} \\ & = -\frac {3 i f^3 x}{8 a d^3}-\frac {i (e+f x)^3}{4 a d}-\frac {6 f^3 \cosh (c+d x)}{a d^4}-\frac {3 f (e+f x)^2 \cosh (c+d x)}{a d^2}+\frac {6 f^2 (e+f x) \sinh (c+d x)}{a d^3}+\frac {(e+f x)^3 \sinh (c+d x)}{a d}+\frac {3 i f^3 \cosh (c+d x) \sinh (c+d x)}{8 a d^4}+\frac {3 i f (e+f x)^2 \cosh (c+d x) \sinh (c+d x)}{4 a d^2}-\frac {3 i f^2 (e+f x) \sinh ^2(c+d x)}{4 a d^3}-\frac {i (e+f x)^3 \sinh ^2(c+d x)}{2 a d} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.86 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.58 \[ \int \frac {(e+f x)^3 \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {-96 f \left (2 f^2+d^2 (e+f x)^2\right ) \cosh (c+d x)-4 i d (e+f x) \left (3 f^2+2 d^2 (e+f x)^2\right ) \cosh (2 (c+d x))+4 \left (8 d (e+f x) \left (6 f^2+d^2 (e+f x)^2\right )+3 i f \left (f^2+2 d^2 (e+f x)^2\right ) \cosh (c+d x)\right ) \sinh (c+d x)}{32 a d^4} \]

[In]

Integrate[((e + f*x)^3*Cosh[c + d*x]^3)/(a + I*a*Sinh[c + d*x]),x]

[Out]

(-96*f*(2*f^2 + d^2*(e + f*x)^2)*Cosh[c + d*x] - (4*I)*d*(e + f*x)*(3*f^2 + 2*d^2*(e + f*x)^2)*Cosh[2*(c + d*x
)] + 4*(8*d*(e + f*x)*(6*f^2 + d^2*(e + f*x)^2) + (3*I)*f*(f^2 + 2*d^2*(e + f*x)^2)*Cosh[c + d*x])*Sinh[c + d*
x])/(32*a*d^4)

Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 428 vs. \(2 (213 ) = 426\).

Time = 34.93 (sec) , antiderivative size = 429, normalized size of antiderivative = 1.86

method result size
risch \(-\frac {i \left (4 d^{3} x^{3} f^{3}+12 d^{3} e \,f^{2} x^{2}+12 d^{3} e^{2} f x -6 d^{2} f^{3} x^{2}+4 e^{3} d^{3}-12 d^{2} e \,f^{2} x -6 d^{2} e^{2} f +6 d \,f^{3} x +6 e \,f^{2} d -3 f^{3}\right ) {\mathrm e}^{2 d x +2 c}}{32 d^{4} a}+\frac {\left (d^{3} x^{3} f^{3}+3 d^{3} e \,f^{2} x^{2}+3 d^{3} e^{2} f x -3 d^{2} f^{3} x^{2}+e^{3} d^{3}-6 d^{2} e \,f^{2} x -3 d^{2} e^{2} f +6 d \,f^{3} x +6 e \,f^{2} d -6 f^{3}\right ) {\mathrm e}^{d x +c}}{2 d^{4} a}-\frac {\left (d^{3} x^{3} f^{3}+3 d^{3} e \,f^{2} x^{2}+3 d^{3} e^{2} f x +3 d^{2} f^{3} x^{2}+e^{3} d^{3}+6 d^{2} e \,f^{2} x +3 d^{2} e^{2} f +6 d \,f^{3} x +6 e \,f^{2} d +6 f^{3}\right ) {\mathrm e}^{-d x -c}}{2 d^{4} a}-\frac {i \left (4 d^{3} x^{3} f^{3}+12 d^{3} e \,f^{2} x^{2}+12 d^{3} e^{2} f x +6 d^{2} f^{3} x^{2}+4 e^{3} d^{3}+12 d^{2} e \,f^{2} x +6 d^{2} e^{2} f +6 d \,f^{3} x +6 e \,f^{2} d +3 f^{3}\right ) {\mathrm e}^{-2 d x -2 c}}{32 d^{4} a}\) \(429\)
derivativedivides \(-\frac {3 i d e \,f^{2} \left (\frac {\left (d x +c \right )^{2} \cosh \left (d x +c \right )^{2}}{2}-\frac {\left (d x +c \right ) \cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}-\frac {\left (d x +c \right )^{2}}{4}+\frac {\cosh \left (d x +c \right )^{2}}{4}\right )-\frac {3 i c \,d^{2} e^{2} f \cosh \left (d x +c \right )^{2}}{2}+3 i c^{2} f^{3} \left (\frac {\left (d x +c \right ) \cosh \left (d x +c \right )^{2}}{2}-\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{4}-\frac {d x}{4}-\frac {c}{4}\right )-6 i c d e \,f^{2} \left (\frac {\left (d x +c \right ) \cosh \left (d x +c \right )^{2}}{2}-\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{4}-\frac {d x}{4}-\frac {c}{4}\right )+i f^{3} \left (\frac {\left (d x +c \right )^{3} \cosh \left (d x +c \right )^{2}}{2}-\frac {3 \left (d x +c \right )^{2} \cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{4}-\frac {\left (d x +c \right )^{3}}{4}+\frac {3 \left (d x +c \right ) \cosh \left (d x +c \right )^{2}}{4}-\frac {3 \sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{8}-\frac {3 d x}{8}-\frac {3 c}{8}\right )+\frac {3 i c^{2} d e \,f^{2} \cosh \left (d x +c \right )^{2}}{2}-\frac {i c^{3} f^{3} \cosh \left (d x +c \right )^{2}}{2}-3 i c \,f^{3} \left (\frac {\left (d x +c \right )^{2} \cosh \left (d x +c \right )^{2}}{2}-\frac {\left (d x +c \right ) \cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}-\frac {\left (d x +c \right )^{2}}{4}+\frac {\cosh \left (d x +c \right )^{2}}{4}\right )+3 i d^{2} e^{2} f \left (\frac {\left (d x +c \right ) \cosh \left (d x +c \right )^{2}}{2}-\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{4}-\frac {d x}{4}-\frac {c}{4}\right )+\frac {i d^{3} e^{3} \cosh \left (d x +c \right )^{2}}{2}+\sinh \left (d x +c \right ) c^{3} f^{3}-3 \sinh \left (d x +c \right ) c^{2} d e \,f^{2}-3 c^{2} f^{3} \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )+3 \sinh \left (d x +c \right ) c \,d^{2} e^{2} f +6 c d e \,f^{2} \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )+3 c \,f^{3} \left (\left (d x +c \right )^{2} \sinh \left (d x +c \right )-2 \left (d x +c \right ) \cosh \left (d x +c \right )+2 \sinh \left (d x +c \right )\right )-\sinh \left (d x +c \right ) d^{3} e^{3}-3 d^{2} e^{2} f \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )-3 d e \,f^{2} \left (\left (d x +c \right )^{2} \sinh \left (d x +c \right )-2 \left (d x +c \right ) \cosh \left (d x +c \right )+2 \sinh \left (d x +c \right )\right )-f^{3} \left (\left (d x +c \right )^{3} \sinh \left (d x +c \right )-3 \left (d x +c \right )^{2} \cosh \left (d x +c \right )+6 \left (d x +c \right ) \sinh \left (d x +c \right )-6 \cosh \left (d x +c \right )\right )}{d^{4} a}\) \(726\)
default \(-\frac {3 i d e \,f^{2} \left (\frac {\left (d x +c \right )^{2} \cosh \left (d x +c \right )^{2}}{2}-\frac {\left (d x +c \right ) \cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}-\frac {\left (d x +c \right )^{2}}{4}+\frac {\cosh \left (d x +c \right )^{2}}{4}\right )-\frac {3 i c \,d^{2} e^{2} f \cosh \left (d x +c \right )^{2}}{2}+3 i c^{2} f^{3} \left (\frac {\left (d x +c \right ) \cosh \left (d x +c \right )^{2}}{2}-\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{4}-\frac {d x}{4}-\frac {c}{4}\right )-6 i c d e \,f^{2} \left (\frac {\left (d x +c \right ) \cosh \left (d x +c \right )^{2}}{2}-\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{4}-\frac {d x}{4}-\frac {c}{4}\right )+i f^{3} \left (\frac {\left (d x +c \right )^{3} \cosh \left (d x +c \right )^{2}}{2}-\frac {3 \left (d x +c \right )^{2} \cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{4}-\frac {\left (d x +c \right )^{3}}{4}+\frac {3 \left (d x +c \right ) \cosh \left (d x +c \right )^{2}}{4}-\frac {3 \sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{8}-\frac {3 d x}{8}-\frac {3 c}{8}\right )+\frac {3 i c^{2} d e \,f^{2} \cosh \left (d x +c \right )^{2}}{2}-\frac {i c^{3} f^{3} \cosh \left (d x +c \right )^{2}}{2}-3 i c \,f^{3} \left (\frac {\left (d x +c \right )^{2} \cosh \left (d x +c \right )^{2}}{2}-\frac {\left (d x +c \right ) \cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}-\frac {\left (d x +c \right )^{2}}{4}+\frac {\cosh \left (d x +c \right )^{2}}{4}\right )+3 i d^{2} e^{2} f \left (\frac {\left (d x +c \right ) \cosh \left (d x +c \right )^{2}}{2}-\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{4}-\frac {d x}{4}-\frac {c}{4}\right )+\frac {i d^{3} e^{3} \cosh \left (d x +c \right )^{2}}{2}+\sinh \left (d x +c \right ) c^{3} f^{3}-3 \sinh \left (d x +c \right ) c^{2} d e \,f^{2}-3 c^{2} f^{3} \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )+3 \sinh \left (d x +c \right ) c \,d^{2} e^{2} f +6 c d e \,f^{2} \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )+3 c \,f^{3} \left (\left (d x +c \right )^{2} \sinh \left (d x +c \right )-2 \left (d x +c \right ) \cosh \left (d x +c \right )+2 \sinh \left (d x +c \right )\right )-\sinh \left (d x +c \right ) d^{3} e^{3}-3 d^{2} e^{2} f \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )-3 d e \,f^{2} \left (\left (d x +c \right )^{2} \sinh \left (d x +c \right )-2 \left (d x +c \right ) \cosh \left (d x +c \right )+2 \sinh \left (d x +c \right )\right )-f^{3} \left (\left (d x +c \right )^{3} \sinh \left (d x +c \right )-3 \left (d x +c \right )^{2} \cosh \left (d x +c \right )+6 \left (d x +c \right ) \sinh \left (d x +c \right )-6 \cosh \left (d x +c \right )\right )}{d^{4} a}\) \(726\)

[In]

int((f*x+e)^3*cosh(d*x+c)^3/(a+I*a*sinh(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/32*I*(4*d^3*f^3*x^3+12*d^3*e*f^2*x^2+12*d^3*e^2*f*x-6*d^2*f^3*x^2+4*d^3*e^3-12*d^2*e*f^2*x-6*d^2*e^2*f+6*d*
f^3*x+6*d*e*f^2-3*f^3)/d^4/a*exp(2*d*x+2*c)+1/2*(d^3*f^3*x^3+3*d^3*e*f^2*x^2+3*d^3*e^2*f*x-3*d^2*f^3*x^2+d^3*e
^3-6*d^2*e*f^2*x-3*d^2*e^2*f+6*d*f^3*x+6*d*e*f^2-6*f^3)/d^4/a*exp(d*x+c)-1/2*(d^3*f^3*x^3+3*d^3*e*f^2*x^2+3*d^
3*e^2*f*x+3*d^2*f^3*x^2+d^3*e^3+6*d^2*e*f^2*x+3*d^2*e^2*f+6*d*f^3*x+6*d*e*f^2+6*f^3)/d^4/a*exp(-d*x-c)-1/32*I*
(4*d^3*f^3*x^3+12*d^3*e*f^2*x^2+12*d^3*e^2*f*x+6*d^2*f^3*x^2+4*d^3*e^3+12*d^2*e*f^2*x+6*d^2*e^2*f+6*d*f^3*x+6*
d*e*f^2+3*f^3)/a/d^4*exp(-2*d*x-2*c)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 405, normalized size of antiderivative = 1.75 \[ \int \frac {(e+f x)^3 \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {{\left (-4 i \, d^{3} f^{3} x^{3} - 4 i \, d^{3} e^{3} - 6 i \, d^{2} e^{2} f - 6 i \, d e f^{2} - 3 i \, f^{3} - 6 \, {\left (2 i \, d^{3} e f^{2} + i \, d^{2} f^{3}\right )} x^{2} - 6 \, {\left (2 i \, d^{3} e^{2} f + 2 i \, d^{2} e f^{2} + i \, d f^{3}\right )} x + {\left (-4 i \, d^{3} f^{3} x^{3} - 4 i \, d^{3} e^{3} + 6 i \, d^{2} e^{2} f - 6 i \, d e f^{2} + 3 i \, f^{3} - 6 \, {\left (2 i \, d^{3} e f^{2} - i \, d^{2} f^{3}\right )} x^{2} - 6 \, {\left (2 i \, d^{3} e^{2} f - 2 i \, d^{2} e f^{2} + i \, d f^{3}\right )} x\right )} e^{\left (4 \, d x + 4 \, c\right )} + 16 \, {\left (d^{3} f^{3} x^{3} + d^{3} e^{3} - 3 \, d^{2} e^{2} f + 6 \, d e f^{2} - 6 \, f^{3} + 3 \, {\left (d^{3} e f^{2} - d^{2} f^{3}\right )} x^{2} + 3 \, {\left (d^{3} e^{2} f - 2 \, d^{2} e f^{2} + 2 \, d f^{3}\right )} x\right )} e^{\left (3 \, d x + 3 \, c\right )} - 16 \, {\left (d^{3} f^{3} x^{3} + d^{3} e^{3} + 3 \, d^{2} e^{2} f + 6 \, d e f^{2} + 6 \, f^{3} + 3 \, {\left (d^{3} e f^{2} + d^{2} f^{3}\right )} x^{2} + 3 \, {\left (d^{3} e^{2} f + 2 \, d^{2} e f^{2} + 2 \, d f^{3}\right )} x\right )} e^{\left (d x + c\right )}\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{32 \, a d^{4}} \]

[In]

integrate((f*x+e)^3*cosh(d*x+c)^3/(a+I*a*sinh(d*x+c)),x, algorithm="fricas")

[Out]

1/32*(-4*I*d^3*f^3*x^3 - 4*I*d^3*e^3 - 6*I*d^2*e^2*f - 6*I*d*e*f^2 - 3*I*f^3 - 6*(2*I*d^3*e*f^2 + I*d^2*f^3)*x
^2 - 6*(2*I*d^3*e^2*f + 2*I*d^2*e*f^2 + I*d*f^3)*x + (-4*I*d^3*f^3*x^3 - 4*I*d^3*e^3 + 6*I*d^2*e^2*f - 6*I*d*e
*f^2 + 3*I*f^3 - 6*(2*I*d^3*e*f^2 - I*d^2*f^3)*x^2 - 6*(2*I*d^3*e^2*f - 2*I*d^2*e*f^2 + I*d*f^3)*x)*e^(4*d*x +
 4*c) + 16*(d^3*f^3*x^3 + d^3*e^3 - 3*d^2*e^2*f + 6*d*e*f^2 - 6*f^3 + 3*(d^3*e*f^2 - d^2*f^3)*x^2 + 3*(d^3*e^2
*f - 2*d^2*e*f^2 + 2*d*f^3)*x)*e^(3*d*x + 3*c) - 16*(d^3*f^3*x^3 + d^3*e^3 + 3*d^2*e^2*f + 6*d*e*f^2 + 6*f^3 +
 3*(d^3*e*f^2 + d^2*f^3)*x^2 + 3*(d^3*e^2*f + 2*d^2*e*f^2 + 2*d*f^3)*x)*e^(d*x + c))*e^(-2*d*x - 2*c)/(a*d^4)

Sympy [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1040 vs. \(2 (214) = 428\).

Time = 0.60 (sec) , antiderivative size = 1040, normalized size of antiderivative = 4.50 \[ \int \frac {(e+f x)^3 \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=\begin {cases} \frac {\left (\left (- 2048 a^{3} d^{15} e^{3} e^{2 c} - 6144 a^{3} d^{15} e^{2} f x e^{2 c} - 6144 a^{3} d^{15} e f^{2} x^{2} e^{2 c} - 2048 a^{3} d^{15} f^{3} x^{3} e^{2 c} - 6144 a^{3} d^{14} e^{2} f e^{2 c} - 12288 a^{3} d^{14} e f^{2} x e^{2 c} - 6144 a^{3} d^{14} f^{3} x^{2} e^{2 c} - 12288 a^{3} d^{13} e f^{2} e^{2 c} - 12288 a^{3} d^{13} f^{3} x e^{2 c} - 12288 a^{3} d^{12} f^{3} e^{2 c}\right ) e^{- d x} + \left (2048 a^{3} d^{15} e^{3} e^{4 c} + 6144 a^{3} d^{15} e^{2} f x e^{4 c} + 6144 a^{3} d^{15} e f^{2} x^{2} e^{4 c} + 2048 a^{3} d^{15} f^{3} x^{3} e^{4 c} - 6144 a^{3} d^{14} e^{2} f e^{4 c} - 12288 a^{3} d^{14} e f^{2} x e^{4 c} - 6144 a^{3} d^{14} f^{3} x^{2} e^{4 c} + 12288 a^{3} d^{13} e f^{2} e^{4 c} + 12288 a^{3} d^{13} f^{3} x e^{4 c} - 12288 a^{3} d^{12} f^{3} e^{4 c}\right ) e^{d x} + \left (- 512 i a^{3} d^{15} e^{3} e^{c} - 1536 i a^{3} d^{15} e^{2} f x e^{c} - 1536 i a^{3} d^{15} e f^{2} x^{2} e^{c} - 512 i a^{3} d^{15} f^{3} x^{3} e^{c} - 768 i a^{3} d^{14} e^{2} f e^{c} - 1536 i a^{3} d^{14} e f^{2} x e^{c} - 768 i a^{3} d^{14} f^{3} x^{2} e^{c} - 768 i a^{3} d^{13} e f^{2} e^{c} - 768 i a^{3} d^{13} f^{3} x e^{c} - 384 i a^{3} d^{12} f^{3} e^{c}\right ) e^{- 2 d x} + \left (- 512 i a^{3} d^{15} e^{3} e^{5 c} - 1536 i a^{3} d^{15} e^{2} f x e^{5 c} - 1536 i a^{3} d^{15} e f^{2} x^{2} e^{5 c} - 512 i a^{3} d^{15} f^{3} x^{3} e^{5 c} + 768 i a^{3} d^{14} e^{2} f e^{5 c} + 1536 i a^{3} d^{14} e f^{2} x e^{5 c} + 768 i a^{3} d^{14} f^{3} x^{2} e^{5 c} - 768 i a^{3} d^{13} e f^{2} e^{5 c} - 768 i a^{3} d^{13} f^{3} x e^{5 c} + 384 i a^{3} d^{12} f^{3} e^{5 c}\right ) e^{2 d x}\right ) e^{- 3 c}}{4096 a^{4} d^{16}} & \text {for}\: a^{4} d^{16} e^{3 c} \neq 0 \\\frac {x^{4} \left (- i f^{3} e^{4 c} + 2 f^{3} e^{3 c} + 2 f^{3} e^{c} + i f^{3}\right ) e^{- 2 c}}{16 a} + \frac {x^{3} \left (- i e f^{2} e^{4 c} + 2 e f^{2} e^{3 c} + 2 e f^{2} e^{c} + i e f^{2}\right ) e^{- 2 c}}{4 a} + \frac {x^{2} \left (- 3 i e^{2} f e^{4 c} + 6 e^{2} f e^{3 c} + 6 e^{2} f e^{c} + 3 i e^{2} f\right ) e^{- 2 c}}{8 a} + \frac {x \left (- i e^{3} e^{4 c} + 2 e^{3} e^{3 c} + 2 e^{3} e^{c} + i e^{3}\right ) e^{- 2 c}}{4 a} & \text {otherwise} \end {cases} \]

[In]

integrate((f*x+e)**3*cosh(d*x+c)**3/(a+I*a*sinh(d*x+c)),x)

[Out]

Piecewise((((-2048*a**3*d**15*e**3*exp(2*c) - 6144*a**3*d**15*e**2*f*x*exp(2*c) - 6144*a**3*d**15*e*f**2*x**2*
exp(2*c) - 2048*a**3*d**15*f**3*x**3*exp(2*c) - 6144*a**3*d**14*e**2*f*exp(2*c) - 12288*a**3*d**14*e*f**2*x*ex
p(2*c) - 6144*a**3*d**14*f**3*x**2*exp(2*c) - 12288*a**3*d**13*e*f**2*exp(2*c) - 12288*a**3*d**13*f**3*x*exp(2
*c) - 12288*a**3*d**12*f**3*exp(2*c))*exp(-d*x) + (2048*a**3*d**15*e**3*exp(4*c) + 6144*a**3*d**15*e**2*f*x*ex
p(4*c) + 6144*a**3*d**15*e*f**2*x**2*exp(4*c) + 2048*a**3*d**15*f**3*x**3*exp(4*c) - 6144*a**3*d**14*e**2*f*ex
p(4*c) - 12288*a**3*d**14*e*f**2*x*exp(4*c) - 6144*a**3*d**14*f**3*x**2*exp(4*c) + 12288*a**3*d**13*e*f**2*exp
(4*c) + 12288*a**3*d**13*f**3*x*exp(4*c) - 12288*a**3*d**12*f**3*exp(4*c))*exp(d*x) + (-512*I*a**3*d**15*e**3*
exp(c) - 1536*I*a**3*d**15*e**2*f*x*exp(c) - 1536*I*a**3*d**15*e*f**2*x**2*exp(c) - 512*I*a**3*d**15*f**3*x**3
*exp(c) - 768*I*a**3*d**14*e**2*f*exp(c) - 1536*I*a**3*d**14*e*f**2*x*exp(c) - 768*I*a**3*d**14*f**3*x**2*exp(
c) - 768*I*a**3*d**13*e*f**2*exp(c) - 768*I*a**3*d**13*f**3*x*exp(c) - 384*I*a**3*d**12*f**3*exp(c))*exp(-2*d*
x) + (-512*I*a**3*d**15*e**3*exp(5*c) - 1536*I*a**3*d**15*e**2*f*x*exp(5*c) - 1536*I*a**3*d**15*e*f**2*x**2*ex
p(5*c) - 512*I*a**3*d**15*f**3*x**3*exp(5*c) + 768*I*a**3*d**14*e**2*f*exp(5*c) + 1536*I*a**3*d**14*e*f**2*x*e
xp(5*c) + 768*I*a**3*d**14*f**3*x**2*exp(5*c) - 768*I*a**3*d**13*e*f**2*exp(5*c) - 768*I*a**3*d**13*f**3*x*exp
(5*c) + 384*I*a**3*d**12*f**3*exp(5*c))*exp(2*d*x))*exp(-3*c)/(4096*a**4*d**16), Ne(a**4*d**16*exp(3*c), 0)),
(x**4*(-I*f**3*exp(4*c) + 2*f**3*exp(3*c) + 2*f**3*exp(c) + I*f**3)*exp(-2*c)/(16*a) + x**3*(-I*e*f**2*exp(4*c
) + 2*e*f**2*exp(3*c) + 2*e*f**2*exp(c) + I*e*f**2)*exp(-2*c)/(4*a) + x**2*(-3*I*e**2*f*exp(4*c) + 6*e**2*f*ex
p(3*c) + 6*e**2*f*exp(c) + 3*I*e**2*f)*exp(-2*c)/(8*a) + x*(-I*e**3*exp(4*c) + 2*e**3*exp(3*c) + 2*e**3*exp(c)
 + I*e**3)*exp(-2*c)/(4*a), True))

Maxima [F(-2)]

Exception generated. \[ \int \frac {(e+f x)^3 \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=\text {Exception raised: RuntimeError} \]

[In]

integrate((f*x+e)^3*cosh(d*x+c)^3/(a+I*a*sinh(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is undefined.

Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 618 vs. \(2 (207) = 414\).

Time = 0.29 (sec) , antiderivative size = 618, normalized size of antiderivative = 2.68 \[ \int \frac {(e+f x)^3 \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {{\left (4 i \, d^{3} f^{3} x^{3} e^{\left (4 \, d x + 4 \, c\right )} - 16 \, d^{3} f^{3} x^{3} e^{\left (3 \, d x + 3 \, c\right )} + 16 \, d^{3} f^{3} x^{3} e^{\left (d x + c\right )} + 4 i \, d^{3} f^{3} x^{3} + 12 i \, d^{3} e f^{2} x^{2} e^{\left (4 \, d x + 4 \, c\right )} - 48 \, d^{3} e f^{2} x^{2} e^{\left (3 \, d x + 3 \, c\right )} + 48 \, d^{3} e f^{2} x^{2} e^{\left (d x + c\right )} + 12 i \, d^{3} e f^{2} x^{2} + 12 i \, d^{3} e^{2} f x e^{\left (4 \, d x + 4 \, c\right )} - 6 i \, d^{2} f^{3} x^{2} e^{\left (4 \, d x + 4 \, c\right )} - 48 \, d^{3} e^{2} f x e^{\left (3 \, d x + 3 \, c\right )} + 48 \, d^{2} f^{3} x^{2} e^{\left (3 \, d x + 3 \, c\right )} + 48 \, d^{3} e^{2} f x e^{\left (d x + c\right )} + 48 \, d^{2} f^{3} x^{2} e^{\left (d x + c\right )} + 12 i \, d^{3} e^{2} f x + 6 i \, d^{2} f^{3} x^{2} + 4 i \, d^{3} e^{3} e^{\left (4 \, d x + 4 \, c\right )} - 12 i \, d^{2} e f^{2} x e^{\left (4 \, d x + 4 \, c\right )} - 16 \, d^{3} e^{3} e^{\left (3 \, d x + 3 \, c\right )} + 96 \, d^{2} e f^{2} x e^{\left (3 \, d x + 3 \, c\right )} + 16 \, d^{3} e^{3} e^{\left (d x + c\right )} + 96 \, d^{2} e f^{2} x e^{\left (d x + c\right )} + 4 i \, d^{3} e^{3} + 12 i \, d^{2} e f^{2} x - 6 i \, d^{2} e^{2} f e^{\left (4 \, d x + 4 \, c\right )} + 6 i \, d f^{3} x e^{\left (4 \, d x + 4 \, c\right )} + 48 \, d^{2} e^{2} f e^{\left (3 \, d x + 3 \, c\right )} - 96 \, d f^{3} x e^{\left (3 \, d x + 3 \, c\right )} + 48 \, d^{2} e^{2} f e^{\left (d x + c\right )} + 96 \, d f^{3} x e^{\left (d x + c\right )} + 6 i \, d^{2} e^{2} f + 6 i \, d f^{3} x + 6 i \, d e f^{2} e^{\left (4 \, d x + 4 \, c\right )} - 96 \, d e f^{2} e^{\left (3 \, d x + 3 \, c\right )} + 96 \, d e f^{2} e^{\left (d x + c\right )} + 6 i \, d e f^{2} - 3 i \, f^{3} e^{\left (4 \, d x + 4 \, c\right )} + 96 \, f^{3} e^{\left (3 \, d x + 3 \, c\right )} + 96 \, f^{3} e^{\left (d x + c\right )} + 3 i \, f^{3}\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{32 \, a d^{4}} \]

[In]

integrate((f*x+e)^3*cosh(d*x+c)^3/(a+I*a*sinh(d*x+c)),x, algorithm="giac")

[Out]

-1/32*(4*I*d^3*f^3*x^3*e^(4*d*x + 4*c) - 16*d^3*f^3*x^3*e^(3*d*x + 3*c) + 16*d^3*f^3*x^3*e^(d*x + c) + 4*I*d^3
*f^3*x^3 + 12*I*d^3*e*f^2*x^2*e^(4*d*x + 4*c) - 48*d^3*e*f^2*x^2*e^(3*d*x + 3*c) + 48*d^3*e*f^2*x^2*e^(d*x + c
) + 12*I*d^3*e*f^2*x^2 + 12*I*d^3*e^2*f*x*e^(4*d*x + 4*c) - 6*I*d^2*f^3*x^2*e^(4*d*x + 4*c) - 48*d^3*e^2*f*x*e
^(3*d*x + 3*c) + 48*d^2*f^3*x^2*e^(3*d*x + 3*c) + 48*d^3*e^2*f*x*e^(d*x + c) + 48*d^2*f^3*x^2*e^(d*x + c) + 12
*I*d^3*e^2*f*x + 6*I*d^2*f^3*x^2 + 4*I*d^3*e^3*e^(4*d*x + 4*c) - 12*I*d^2*e*f^2*x*e^(4*d*x + 4*c) - 16*d^3*e^3
*e^(3*d*x + 3*c) + 96*d^2*e*f^2*x*e^(3*d*x + 3*c) + 16*d^3*e^3*e^(d*x + c) + 96*d^2*e*f^2*x*e^(d*x + c) + 4*I*
d^3*e^3 + 12*I*d^2*e*f^2*x - 6*I*d^2*e^2*f*e^(4*d*x + 4*c) + 6*I*d*f^3*x*e^(4*d*x + 4*c) + 48*d^2*e^2*f*e^(3*d
*x + 3*c) - 96*d*f^3*x*e^(3*d*x + 3*c) + 48*d^2*e^2*f*e^(d*x + c) + 96*d*f^3*x*e^(d*x + c) + 6*I*d^2*e^2*f + 6
*I*d*f^3*x + 6*I*d*e*f^2*e^(4*d*x + 4*c) - 96*d*e*f^2*e^(3*d*x + 3*c) + 96*d*e*f^2*e^(d*x + c) + 6*I*d*e*f^2 -
 3*I*f^3*e^(4*d*x + 4*c) + 96*f^3*e^(3*d*x + 3*c) + 96*f^3*e^(d*x + c) + 3*I*f^3)*e^(-2*d*x - 2*c)/(a*d^4)

Mupad [B] (verification not implemented)

Time = 1.87 (sec) , antiderivative size = 449, normalized size of antiderivative = 1.94 \[ \int \frac {(e+f x)^3 \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=-{\mathrm {e}}^{c+d\,x}\,\left (\frac {-d^3\,e^3+3\,d^2\,e^2\,f-6\,d\,e\,f^2+6\,f^3}{2\,a\,d^4}-\frac {f^3\,x^3}{2\,a\,d}+\frac {3\,f^2\,x^2\,\left (f-d\,e\right )}{2\,a\,d^2}-\frac {3\,f\,x\,\left (d^2\,e^2-2\,d\,e\,f+2\,f^2\right )}{2\,a\,d^3}\right )-{\mathrm {e}}^{-2\,c-2\,d\,x}\,\left (\frac {\left (4\,d^3\,e^3+6\,d^2\,e^2\,f+6\,d\,e\,f^2+3\,f^3\right )\,1{}\mathrm {i}}{32\,a\,d^4}+\frac {f^3\,x^3\,1{}\mathrm {i}}{8\,a\,d}+\frac {f\,x\,\left (2\,d^2\,e^2+2\,d\,e\,f+f^2\right )\,3{}\mathrm {i}}{16\,a\,d^3}+\frac {f^2\,x^2\,\left (f+2\,d\,e\right )\,3{}\mathrm {i}}{16\,a\,d^2}\right )+{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (\frac {\left (-4\,d^3\,e^3+6\,d^2\,e^2\,f-6\,d\,e\,f^2+3\,f^3\right )\,1{}\mathrm {i}}{32\,a\,d^4}-\frac {f^3\,x^3\,1{}\mathrm {i}}{8\,a\,d}-\frac {f\,x\,\left (2\,d^2\,e^2-2\,d\,e\,f+f^2\right )\,3{}\mathrm {i}}{16\,a\,d^3}+\frac {f^2\,x^2\,\left (f-2\,d\,e\right )\,3{}\mathrm {i}}{16\,a\,d^2}\right )-{\mathrm {e}}^{-c-d\,x}\,\left (\frac {d^3\,e^3+3\,d^2\,e^2\,f+6\,d\,e\,f^2+6\,f^3}{2\,a\,d^4}+\frac {f^3\,x^3}{2\,a\,d}+\frac {3\,f^2\,x^2\,\left (f+d\,e\right )}{2\,a\,d^2}+\frac {3\,f\,x\,\left (d^2\,e^2+2\,d\,e\,f+2\,f^2\right )}{2\,a\,d^3}\right ) \]

[In]

int((cosh(c + d*x)^3*(e + f*x)^3)/(a + a*sinh(c + d*x)*1i),x)

[Out]

exp(2*c + 2*d*x)*(((3*f^3 - 4*d^3*e^3 + 6*d^2*e^2*f - 6*d*e*f^2)*1i)/(32*a*d^4) - (f^3*x^3*1i)/(8*a*d) - (f*x*
(f^2 + 2*d^2*e^2 - 2*d*e*f)*3i)/(16*a*d^3) + (f^2*x^2*(f - 2*d*e)*3i)/(16*a*d^2)) - exp(- 2*c - 2*d*x)*(((3*f^
3 + 4*d^3*e^3 + 6*d^2*e^2*f + 6*d*e*f^2)*1i)/(32*a*d^4) + (f^3*x^3*1i)/(8*a*d) + (f*x*(f^2 + 2*d^2*e^2 + 2*d*e
*f)*3i)/(16*a*d^3) + (f^2*x^2*(f + 2*d*e)*3i)/(16*a*d^2)) - exp(c + d*x)*((6*f^3 - d^3*e^3 + 3*d^2*e^2*f - 6*d
*e*f^2)/(2*a*d^4) - (f^3*x^3)/(2*a*d) + (3*f^2*x^2*(f - d*e))/(2*a*d^2) - (3*f*x*(2*f^2 + d^2*e^2 - 2*d*e*f))/
(2*a*d^3)) - exp(- c - d*x)*((6*f^3 + d^3*e^3 + 3*d^2*e^2*f + 6*d*e*f^2)/(2*a*d^4) + (f^3*x^3)/(2*a*d) + (3*f^
2*x^2*(f + d*e))/(2*a*d^2) + (3*f*x*(2*f^2 + d^2*e^2 + 2*d*e*f))/(2*a*d^3))